package edu.pku.sei.mte.compositetrans.flow;

import java.util.Map;

import org.w3c.dom.Element;

public abstract class FlowNode {
	protected boolean isSucceed = false;

	public boolean isReady(){
		return true;
	}
	
	public boolean execute() throws Exception{
		isSucceed = true;
		return isSucceed;
	}
	
	public boolean isSucceed(){
		return isSucceed;
	}
	
	public abstract FlowNode getNext();
	
	public void load(Element e, Map<Integer, FlowNode> FlowNodesMap){}
	
	protected int getPostId(Element e){
		return Integer.parseInt(e.getAttribute("post"));
	}
}
